!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Qs=e()}(function(){return function o(n,i,a){function c(t,e){if(!i[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}r=i[t]={exports:{}};n[t][0].call(r.exports,function(e){var r=n[t][1][e];return c(r||e)},r,r.exports,o,n,i,a)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e<a.length;e++)c(a[e]);return c}({1:[function(e,r,t){"use strict";var o=String.prototype.replace,n=/%20/g;r.exports={default:"RFC3986",formatters:{RFC1738:function(e){return o.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],2:[function(e,r,t){"use strict";var o=e("./stringify"),n=e("./parse"),e=e("./formats");r.exports={formats:e,parse:n,stringify:o}},{"./formats":1,"./parse":3,"./stringify":4}],3:[function(e,r,t){"use strict";function l(e,r,t){if(e){var o=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,n=/(\[[^[\]]*])/g,i=/(\[[^[\]]*])/.exec(o),e=i?o.slice(0,i.index):o,a=[];if(e){if(!t.plainObjects&&u.call(Object.prototype,e)&&!t.allowPrototypes)return;a.push(e)}for(var c=0;null!==(i=n.exec(o))&&c<t.depth;){if(c+=1,!t.plainObjects&&u.call(Object.prototype,i[1].slice(1,-1))&&!t.allowPrototypes)return;a.push(i[1])}return i&&a.push("["+o.slice(i.index)+"]"),function(e,r,t){for(var o=r,n=e.length-1;0<=n;--n){var i,a,c,l=e[n];"[]"===l?i=(i=[]).concat(o):(i=t.plainObjects?Object.create(null):{},a="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,c=parseInt(a,10),!isNaN(c)&&l!==a&&String(c)===a&&0<=c&&t.parseArrays&&c<=t.arrayLimit?(i=[])[c]=o:i[a]=o),o=i}return o}(a,r,t)}}var f=e("./utils"),u=Object.prototype.hasOwnProperty,s={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:f.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1};r.exports=function(e,r){var t=r?f.assign({},r):{};if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(t.ignoreQueryPrefix=!0===t.ignoreQueryPrefix,t.delimiter=("string"==typeof t.delimiter||f.isRegExp(t.delimiter)?t:s).delimiter,t.depth=("number"==typeof t.depth?t:s).depth,t.arrayLimit=("number"==typeof t.arrayLimit?t:s).arrayLimit,t.parseArrays=!1!==t.parseArrays,t.decoder=("function"==typeof t.decoder?t:s).decoder,t.allowDots=("boolean"==typeof t.allowDots?t:s).allowDots,t.plainObjects=("boolean"==typeof t.plainObjects?t:s).plainObjects,t.allowPrototypes=("boolean"==typeof t.allowPrototypes?t:s).allowPrototypes,t.parameterLimit=("number"==typeof t.parameterLimit?t:s).parameterLimit,t.strictNullHandling=("boolean"==typeof t.strictNullHandling?t:s).strictNullHandling,""===e||null==e)return t.plainObjects?Object.create(null):{};for(var o="string"==typeof e?function(e,r){for(var t={},o=r.ignoreQueryPrefix?e.replace(/^\?/,""):e,e=r.parameterLimit===1/0?void 0:r.parameterLimit,n=o.split(r.delimiter,e),i=0;i<n.length;++i){var a,c=n[i],l=c.indexOf("]="),l=-1===l?c.indexOf("="):l+1,l=-1===l?(a=r.decoder(c,s.decoder),r.strictNullHandling?null:""):(a=r.decoder(c.slice(0,l),s.decoder),r.decoder(c.slice(l+1),s.decoder));u.call(t,a)?t[a]=[].concat(t[a]).concat(l):t[a]=l}return t}(e,t):e,n=t.plainObjects?Object.create(null):{},i=Object.keys(o),a=0;a<i.length;++a)var c=i[a],c=l(c,o[c],t),n=f.merge(n,c,t);return f.compact(n)}},{"./utils":5}],4:[function(e,r,t){"use strict";function h(e,r,t,o,n,i,a,c,l,f,u,s){var p=e;if("function"==typeof a)p=a(r,p);else if(p instanceof Date)p=f(p);else if(null===p){if(o)return i&&!s?i(r,A.encoder):r;p=""}if("string"==typeof p||"number"==typeof p||"boolean"==typeof p||j.isBuffer(p))return i?[u(s?r:i(r,A.encoder))+"="+u(i(p,A.encoder))]:[u(r)+"="+u(String(p))];var d,y=[];if(void 0===p)return y;d=Array.isArray(a)?a:(e=Object.keys(p),c?e.sort(c):e);for(var b=0;b<d.length;++b){var g=d[b];n&&null===p[g]||(y=Array.isArray(p)?y.concat(h(p[g],t(r,g),t,o,n,i,a,c,l,f,u,s)):y.concat(h(p[g],r+(l?"."+g:"["+g+"]"),t,o,n,i,a,c,l,f,u,s)))}return y}var j=e("./utils"),O=e("./formats"),w={brackets:function(e){return e+"[]"},indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},o=Date.prototype.toISOString,A={delimiter:"&",encode:!0,encoder:j.encode,encodeValuesOnly:!1,serializeDate:function(e){return o.call(e)},skipNulls:!1,strictNullHandling:!1};r.exports=function(e,r){var t=e,o=r?j.assign({},r):{};if(null!==o.encoder&&void 0!==o.encoder&&"function"!=typeof o.encoder)throw new TypeError("Encoder has to be a function.");var e=(void 0===o.delimiter?A:o).delimiter,n=("boolean"==typeof o.strictNullHandling?o:A).strictNullHandling,i=("boolean"==typeof o.skipNulls?o:A).skipNulls,a=("boolean"==typeof o.encode?o:A).encode,c=("function"==typeof o.encoder?o:A).encoder,l="function"==typeof o.sort?o.sort:null,f=void 0!==o.allowDots&&o.allowDots,u=("function"==typeof o.serializeDate?o:A).serializeDate,s=("boolean"==typeof o.encodeValuesOnly?o:A).encodeValuesOnly;if(void 0===o.format)o.format=O.default;else if(!Object.prototype.hasOwnProperty.call(O.formatters,o.format))throw new TypeError("Unknown format option provided.");var p,d=O.formatters[o.format];"function"==typeof o.filter?t=(p=o.filter)("",t):Array.isArray(o.filter)&&(g=p=o.filter);var y=[];if("object"!=typeof t||null===t)return"";var r=o.arrayFormat in w?o.arrayFormat:!("indices"in o)||o.indices?"indices":"repeat",b=w[r],g=g||Object.keys(t);l&&g.sort(l);for(var m=0;m<g.length;++m){var v=g[m];i&&null===t[v]||(y=y.concat(h(t[v],v,b,n,i,a?c:null,p,l,f,u,d,s)))}e=y.join(e),o=!0===o.addQueryPrefix?"?":"";return 0<e.length?o+e:""}},{"./formats":1,"./utils":5}],5:[function(e,r,i){"use strict";var a=Object.prototype.hasOwnProperty,c=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}();i.arrayToObject=function(e,r){for(var t=r&&r.plainObjects?Object.create(null):{},o=0;o<e.length;++o)void 0!==e[o]&&(t[o]=e[o]);return t},i.merge=function(t,o,n){if(!o)return t;if("object"!=typeof o){if(Array.isArray(t))t.push(o);else{if("object"!=typeof t)return[t,o];!n.plainObjects&&!n.allowPrototypes&&a.call(Object.prototype,o)||(t[o]=!0)}return t}if("object"!=typeof t)return[t].concat(o);var e=t;return Array.isArray(t)&&!Array.isArray(o)&&(e=i.arrayToObject(t,n)),Array.isArray(t)&&Array.isArray(o)?(o.forEach(function(e,r){a.call(t,r)?t[r]&&"object"==typeof t[r]?t[r]=i.merge(t[r],e,n):t.push(e):t[r]=e}),t):Object.keys(o).reduce(function(e,r){var t=o[r];return a.call(e,r)?e[r]=i.merge(e[r],t,n):e[r]=t,e},e)},i.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},i.decode=function(r){try{return decodeURIComponent(r.replace(/\+/g," "))}catch(e){return r}},i.encode=function(e){if(0===e.length)return e;for(var r="string"==typeof e?e:String(e),t="",o=0;o<r.length;++o){var n=r.charCodeAt(o);45===n||46===n||95===n||126===n||48<=n&&n<=57||65<=n&&n<=90||97<=n&&n<=122?t+=r.charAt(o):n<128?t+=c[n]:n<2048?t+=c[192|n>>6]+c[128|63&n]:n<55296||57344<=n?t+=c[224|n>>12]+c[128|n>>6&63]+c[128|63&n]:(o+=1,n=65536+((1023&n)<<10|1023&r.charCodeAt(o)),t+=c[240|n>>18]+c[128|n>>12&63]+c[128|n>>6&63]+c[128|63&n])}return t},i.compact=function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o<r.length;++o)for(var n=r[o],i=n.obj[n.prop],a=Object.keys(i),c=0;c<a.length;++c){var l=a[c],f=i[l];"object"==typeof f&&null!==f&&-1===t.indexOf(f)&&(r.push({obj:i,prop:l}),t.push(f))}return function(e){for(;e.length;){var r=e.pop(),t=r.obj[r.prop];if(Array.isArray(t)){for(var o=[],n=0;n<t.length;++n)void 0!==t[n]&&o.push(t[n]);r.obj[r.prop]=o}}return t}(r)},i.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},i.isBuffer=function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},{}]},{},[2])(2)});